package com.amazon.ags.jni;

import android.util.Log;
import com.amazon.ags.api.AmazonGamesClient;
import com.amazon.ags.jni.achievements.AchievementsNativeHandler;
import com.amazon.ags.jni.leaderboards.LeaderboardsNativeHandler;
import com.amazon.ags.jni.profiles.ProfilesNativeHandler;
import com.amazon.ags.jni.whispersync.WhisperSyncNativeHandler;

public class AGSJniHandler
{
  private static final String JNI_LIBRARY_NAME = "AmazonGamesJni";
  public static final String TAG = "AGSJniHandler";

  public static void initializeJni(AmazonGamesClient paramAmazonGamesClient)
  {
    Log.i("AGSJniHandler", "Loading Jni library");
    LeaderboardsNativeHandler.initializeNativeHandler(paramAmazonGamesClient);
    AchievementsNativeHandler.initializeNativeHandler(paramAmazonGamesClient);
    WhisperSyncNativeHandler.initializeNativeHandler(paramAmazonGamesClient);
    ProfilesNativeHandler.initializeNativeHandler(paramAmazonGamesClient);
    try
    {
      isLoaded();
      return;
    }
    catch (UnsatisfiedLinkError localUnsatisfiedLinkError1)
    {
      Log.i("AGSJniHandler", "AmazonGamesJni is not loaded, trying to load library");
      try
      {
        System.loadLibrary("AmazonGamesJni");
        return;
      }
      catch (UnsatisfiedLinkError localUnsatisfiedLinkError2)
      {
        throw new RuntimeException("Could not load AmazonGamesJni: " + localUnsatisfiedLinkError2.getMessage());
      }
    }
  }

  public static native void isLoaded();
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.amazon.ags.jni.AGSJniHandler
 * JD-Core Version:    0.6.2
 */